terraform {
  required_providers {
    cloudstack = {
      source = "cloudstack/cloudstack"
      version = "0.5.0"
    }
  }
}

provider "cloudstack" {
  api_url    = "http://172.16.100.9:8080/client/api"
  api_key    = "0q7D8hdCPaDED3Y-YfwwjRtA_MfemseHzlU2kMlBr_FmH9nvUi-zns-mrxAoJ0xM8N28LNtSaFQu1_odoO4BlQ"
  secret_key = "tL4xFFOS7a9CjPaZcFYUsqBYf_fsO2JybljVgAau9lKnzQSbSKGUcMuSpUoG6nd0nV_CewPv4ogU1FSUBLPf6A"
}

resource "cloudstack_instance" "web" {
  name = "tuyb-test-tf"
  service_offering = "76cdbc4d-6c52-43e3-816e-f0c06ff53083"
  network_id = "a89a012e-bb10-45fc-9f4f-767eb06a218b"
  template = "ubuntu-jammy-standard.qcow2"
  root_disk_size = "100"
  zone = "17fd9537-7faf-4fb4-913a-cd367a47688c"
}